﻿//
// Copyright(C) MixModes Inc. 2011
// 

using System;
using System.Windows;
using System.Windows.Controls;
using MixModes.Synergy.Web.VisualFramework.Utilities;

namespace MixModes.Synergy.Web.VisualFramework.Adorners
{
    /// <summary>
    /// Base class for adorners
    /// </summary>
    public abstract class AdornerBase : Control
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="AdornerBase"/> class.
        /// </summary>
        /// <param name="adornedElement">The adorned element.</param>
        /// <exception cref="ArgumentNullException">adornedElement is null</exception>        
        protected AdornerBase(UIElement adornedElement)
        {
            Validate.NotNull(adornedElement, "adornedElement");
            AdornedElement = adornedElement;
            DefaultStyleKey = GetType();
        }

        /// <summary>
        /// The adorned element
        /// </summary>
        protected UIElement AdornedElement
        {
            get; private set;
        }
    }
}
